﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace loginSQL.Window
{
    public partial class AddDataWindow : Form
    {
        public string data;
        public float marginleft = 0f;
        public float margintop = 0f;
        public bool isCanceled = false;

        public AddDataWindow()
        {
            InitializeComponent();
            this.txt_data.Text = "data";
            this.txt_marginleft.Text = "0";
            this.txt_margintop.Text = "0";       
            
        }

        private void btn_apply_Click(object sender, EventArgs e)
        {
            try
            {
                this.data = this.txt_data.Text;
                this.marginleft = (float)Double.Parse(txt_marginleft.Text);
                this.margintop = (float)Double.Parse(txt_margintop.Text);
                Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Number Format Error");
            }
        }

        private void btn_cancel_Click(object sender, EventArgs e)
        {
            isCanceled = true;
            Close();
        }
    }
}
